import React from 'react'
import PropTypes from 'prop-types'
import { View, Text, Image, StyleSheet } from 'react-native'
import { ScaleS, ScaleT } from 'src/utils/ScreenUtil'
import CustomImage from '../../../../components/image/CustomImage'
export default class JobCountInfo extends React.PureComponent {
  static propTypes = {
    data: PropTypes.object
  }

  render () {
    const { data } = this.props
    return (
      <View style={styles.cell} >
        <CustomImage style={[styles.img, styles.img1]} source={require('@/imgC/home/count_view.png')}/>
        <Text style={styles.txt}>{data.viewCount}</Text>
        <CustomImage style={[styles.img, styles.img2]} source={require('@/imgC/home/count_collect.png')}/>
        <Text style={styles.txt}>{data.entryCount}</Text>
        <CustomImage style={[styles.img, styles.img1]} source={require('@/imgC/home/count_chat.png')}/>
        <Text style={styles.txt}>{data.resumeCount}</Text>
        <CustomImage style={[styles.img, styles.img2]} source={require('@/imgC/home/count_favorite.png')}/>
        <Text style={styles.txt}>{data.collectionCount}</Text>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  cell: {
    flex: 1,
    marginTop: ScaleS(22),
    marginHorizontal: ScaleS(20),
    flexDirection: 'row',
    alignItems: 'center'
  },
  img: {
    marginLeft: ScaleS(2),
    marginRight: ScaleS(3),
    resizeMode: 'cover'
  },
  img1: {
    width: ScaleS(12)
  },
  img2: {
    width: ScaleS(9)
  },
  txt: {
    marginRight: ScaleS(13),
    fontSize: ScaleT(12),
    fontWeight: 'bold',
    color: '#B4B6BA',
    height: ScaleS(14),
    lineHeight: ScaleS(14)
  }
})
